Using NTRQ's Command-Line Tools
-------------------------------

Last updated February 17th 2011 - V1.3 (minor update)

DCM2NTRQ
--------

DCM2NTRQ is a unix/windows command-line tool that allows patching of the NTRQ ROM image, allowing you to insert your own set of DPCM/DCM samples. The patcher requires:

- a plain text file listing each (pre-converted) DPCM sample, one file per line
- the NTRQ ROM "ntrq.nes"
- some DPCM samples!

USAGE : DCM2NTRQ <patchfile.txt> <output.nes>

Source code is included in case you need/want to compile it for your system. It's in plain-old C so should be easily built on any platform.

Within the patcher text file, you can use path names for the samples e.g. "MySamples/NES/DPCM/Kick.dcm" (you only need the "quotes" if you have spaces in your file/path names).

When running the tool you specify the sample list and the name of the modified ROM image (probably safest to NOT specify "ntrq.nes"!) but the tool will expect the NTRQ.NES to be in the folder/directory you run it from. This is also the place it will output the modified ROM though, in theory, you could specify a path+filename to output it in a different place.

The "bank" of samples is limited to about 13k (for those who really want to know, the DPCM data in NTRQ goes from $C900 to $FE00) but the tool will throw an error if you exceed this and quit without modifying your ROM. I've tried to put as many error traps as I could think of but it's far from comprehensive.

The tool does NOT convert WAVs etc. to DPCM. You'll have to convert/steal them yourself. Personally I use Damian Yerrick's "81ex" which you can get from his website for free: http://www.pineight.com/nes/81ex.zip but there are others.

NTRQ2NSF
--------

NTRQ2NSF exports a NSF file from an NTRQ .sav file. The exporter requires:

- the NTRQ ROM "ntrq.nes"
- the file "NTRQNSF.BIN" (this file is supplied with each NTRQ build)
- an *uncompressed* NTRQ .sav file (see below)

Usage : NTRQ2NSF <ntrq.sav> <output.nsf> <Region> <number of songs> <NSF name> <composer name> <copyright name>

Source code is included in case you need/want to compile it for your system. It's in C so should easily build on any platform.

The tool will create an NSF based on your current NTRQ ROM so your NSF will contain the same DPCM samples etc.

You need to specify the region, 'PAL' or 'NTSC' for the output NSF.

You also need to specify how many songs you want in the NSF, 1 to 8.

<NSF name>, <composer> and <copyright> are written to the appropriate fields in the NSF header/meta-data. In the NSF format, these fields are limited to 32 characters each. If you exceed this the text will be truncated.

Some emulators store NES .sav files in a compressed format. NTRQ2NSF does not work with compressed .sav files so you must decompress them first (on Mac you can unzip them with GUNZIP but for Windows I'm not sure what to use). The correct file size should be 8k (8192 bytes) - if it is shorter/longer than this the tool will throw an error and quit without outputting anything.


